﻿<!--
        SharePoint 2010 ListManager
        (c) 2010 by Daniel Bedarf

        This Program is licensed under the GNU GLP V2
        It is free to use. Please inform the Author about modification to make the tool better.

        This program is distributed in the hope that it will be useful,
        but WITHOUT ANY WARRANTY; without even the implied warranty of
        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
        GNU General Public License for more details.

        You should have received a copy of the GNU General Public License
        along with this program.  If not, see <http://www.gnu.org/licenses/>.
 -->
    
    <Fluent:RibbonWindow x:Class="CodePlex.DBedarf.Sharepoint.ListManager.frmMain"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:local="clr-namespace:CodePlex.DBedarf.Sharepoint.ListManager"
    xmlns:Fluent="clr-namespace:Fluent;assembly=Fluent"
    xmlns:ad="clr-namespace:AvalonDock;assembly=AvalonDock"
    Height="600" Width="800" Loaded="Window_Loaded" MinHeight="400" MinWidth="400" IsIconVisible="True" Icon="/SharepointListManager;component/App.ico" ShowActivated="True" SizeToContent="Manual" AllowsTransparency="False" Closing="Window_Closing">

         
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="20" />
        </Grid.RowDefinitions>

        <!-- Menü  -->
        <Fluent:Ribbon x:Name="_ribbonManager"   Grid.Row="0"  BackstageBrush="#AE156BFF" CanCustomizeQuickAccessToolBar="False" CanCustomizeRibbon="False" ShowQuickAccessToolBarAboveRibbon="False" IsBackstageOpen="False">
            <!-- 
            <Fluent:Ribbon.QuickAccessItems>
                <Fluent:QuickAccessMenuItem Icon="/Images/Bug.png" IsChecked="True" Text="Report a Bug" >
                    <Fluent:Button Icon="/Images/Bug.png"></Fluent:Button>
                </Fluent:QuickAccessMenuItem>
                <Fluent:QuickAccessMenuItem Icon="/Images/Bug.png" IsChecked="True" Text="Check for Updates" />
            </Fluent:Ribbon.QuickAccessItems>
            -->
            
            <!-- Backstage Area -->
            <Fluent:Ribbon.BackstageItems>
                <Fluent:BackstageTabItem Header="Open"  IsEnabled="True">
                    <Fluent:BackstageTabControl Margin="20,5,20,5">
                        <Fluent:GroupSeparatorMenuItem Text="Sharepoint 2010 ListManager - Connections"/>
                        <TabItem Selector.Selected="Useraction_ConnectToLocalhost" >
                            <TabItem.Header>
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="/Images/connect_local48.png"  Width="48" Height="48" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,0,4,0"></Image>
                                    <TextBlock >Connect to localhost<LineBreak/>                                        
                                    <Run Foreground="DimGray" Text="Click to open http://localhost/"></Run>
                                    </TextBlock>
                                </StackPanel>
                            </TabItem.Header>
                            <!-- Right-side content here -->
                            <StackPanel HorizontalAlignment="Left" Margin="20,0">
                                <!--<Label FontSize="14" Foreground="DimGray" FontWeight="Bold">About SPS2010ListManager</Label>-->
                                
                            </StackPanel>
                        </TabItem>
                        <TabItem >
                            <TabItem.Header>
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="/Images/connect48.png"  Width="48" Height="48" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,0,4,0"></Image>
                                    <TextBlock >Connect to URL<LineBreak/>                                        
                                    <Run Foreground="DimGray" Text="Click here to enter a url"></Run>
                                    </TextBlock>
                                </StackPanel>
                            </TabItem.Header>
                            <!-- Right-side content here -->
                            <StackPanel HorizontalAlignment="Left" Margin="20,0">
                                <Label FontSize="14" Foreground="DimGray" FontWeight="Bold">Connect to URL</Label>
                                <StackPanel Orientation="Horizontal">
                                    <TextBox Width="400" x:Name="txtBackStageURL" Foreground="Black" Background="White"></TextBox>
                                    <Button Width="50" Margin="5,0"  Content="Connect" Click="Useraction_ConnectToServerURL"/>
                                </StackPanel>
                            </StackPanel>
                        </TabItem>
                        <Fluent:GroupSeparatorMenuItem Text="Recently used sites"/>
                        <TabItem >
                            <TabItem.Header>
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="/Images/connect_recent48.png"  Width="48" Height="48" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,0,4,0"></Image>
                                    <TextBlock >Recent used<LineBreak/>                                        
                                    <Run Foreground="DimGray" Text="the last 10 used URLs"></Run>
                                    </TextBlock>
                                </StackPanel>
                            </TabItem.Header>
                            <!-- Right-side content here -->
                            <StackPanel HorizontalAlignment="Left" Margin="20,0">
                                <Fluent:BackstageTabControl Margin="20,5,20,5" x:Name="tabCtrlRecentFiles"  >
                                    <!-- SelectionChanged="Useraction_ConnectToRecentURL"-->
                                </Fluent:BackstageTabControl>
                            </StackPanel>
                        </TabItem>
                    </Fluent:BackstageTabControl>
                    
                </Fluent:BackstageTabItem>
                <Fluent:BackstageTabItem Header="Help">
                    <Fluent:BackstageTabControl Margin="20,5,20,5">
                        <Fluent:GroupSeparatorMenuItem Text="Sharepoint 2010 ListManager - Help and Support"/>
                        <TabItem IsSelected="True">
                            <TabItem.Header>
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="/Images/help48.png"  Width="48" Height="48" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,0,4,0"></Image>
                                    <TextBlock >About SPS2010ListManager<LineBreak/>                                        
                                    <Run Foreground="DimGray" Text="Displays the aboutbox"></Run>
                                    </TextBlock>
                                </StackPanel>
                            </TabItem.Header>
                            <!-- Right-side content here -->
                            <StackPanel HorizontalAlignment="Left" Margin="20,0">
                                <Label FontSize="14" Foreground="DimGray" FontWeight="Bold">About SPS2010ListManager</Label>
                                <RichTextBox Grid.Row="1" IsReadOnly="True">
                                    <!-- Auslagern in Ressource ?? -->
                                    <FlowDocument xml:space="preserve" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"><Paragraph Foreground="#2f2ff5">This Program is licensed under GNU GPL V2 with no warranty</Paragraph><Paragraph>It uses code from the following projects:<LineBreak /> </Paragraph><List MarkerStyle="Disc"><ListItem><Paragraph><Hyperlink NavigateUri="http://fluent.codeplex.com/">FluentRibbonControl</Hyperlink>      Microsoft Public License (Ms-PL)</Paragraph></ListItem><ListItem><Paragraph><Hyperlink NavigateUri="http://avalondock.codeplex.com/">AvalonDock</Hyperlink>                  New BSD License (BSD)</Paragraph></ListItem></List><Paragraph> </Paragraph><Paragraph>You can use thes application for free. Please Check the Project home under: <Hyperlink NavigateUri="http://sps2010listmanager.codeplex.com/">http://sps2010listmanager.codeplex.com/</Hyperlink></Paragraph><Paragraph> </Paragraph><Paragraph> Copyright © Daniel Bedarf (2010)</Paragraph></FlowDocument>
                                </RichTextBox>
                            </StackPanel>
                        </TabItem>
                        <!-- Ende About -->
                        <!-- Support -->
                        <TabItem IsSelected="False" >
                            <TabItem.Header>
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="/Images/support48.png"  Width="48" Height="48" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,0,4,0"></Image>
                                    <TextBlock >Technical Support<LineBreak/>                                        
                                    <Run Foreground="DimGray" Text="Click here to go to the technical support forum"></Run>
                                    </TextBlock>
                                </StackPanel>
                            </TabItem.Header>
                            <!-- Right-side content here -->
                            <StackPanel HorizontalAlignment="Left" Margin="20,0">
                                <Label FontSize="14" Foreground="DimGray" FontWeight="Bold">Technical Support</Label>
                                <Button  Margin="10" Click="Useraction_ContactCodeplex">
                                    <StackPanel>
                                        <Label>Codeplex.com</Label>
                                    <Image Height="48" Source="/Images/codeplex.png" Margin="5">
                                        <Image.Effect>
                                            <DropShadowEffect/>
                                        </Image.Effect>
                                    </Image>
                                    </StackPanel>
                                </Button>
                                <Button  Margin="10" Click="Useraction_ContactYouTube">
                                    <StackPanel>
                                        <Label>YouTube.com</Label>
                                        <Image Height="96" Source="/Images/youtube.png" >
                                            <Image.Effect>
                                                <DropShadowEffect/>
                                            </Image.Effect>
                                        </Image>
                                    </StackPanel>
                                </Button>
                                

                            </StackPanel>
                        </TabItem>
                        <!-- Ende Support -->
                        <!-- Contact -->
                        <TabItem IsSelected="False">
                            <TabItem.Header>
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="/Images/mail48.png"  Width="48" Height="48" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,0,4,0"></Image>
                                    <TextBlock >Contact the Author<LineBreak/>                                        
                                    <Run Foreground="DimGray" Text="Displays information to contact the author"></Run>
                                    </TextBlock>
                                </StackPanel>
                            </TabItem.Header>
                            <!-- Right-side content here -->
                            <StackPanel HorizontalAlignment="Left" Margin="20,0">
                                <Label FontSize="14" Foreground="DimGray" FontWeight="Bold" Content="Contact the Author"/>
                                <TextBlock TextWrapping="Wrap"><Run Text="You can try to contact me on some different ways:"/></TextBlock>
                                <Grid x:Name="grid" ShowGridLines="False" Margin="0,20,0,0">
                                    <Grid.RowDefinitions>
                                        <RowDefinition />
                                        <RowDefinition />
                                        <RowDefinition/>
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="0.098*"/>
                                        <ColumnDefinition Width="0.902*"/>
                                        <ColumnDefinition Width="80" />
                                    </Grid.ColumnDefinitions>
                                    <Label Content="1."/>
                                    <StackPanel Grid.Column="1">
                                        <Label Content="Codeplex Forums" FontWeight="Bold" />
                                        <Label Content="http://sps2010listmanager.codeplex.com/" />
                                    </StackPanel>
                                    <Button x:Name="cmdCodeplex" Grid.Column="3" Margin="10" Click="Useraction_ContactCodeplex">
                                        <Button.RenderTransform>
                                            <TransformGroup>
                                                <ScaleTransform/>
                                                <SkewTransform/>
                                                <RotateTransform/>
                                                <TranslateTransform/>
                                            </TransformGroup>
                                        </Button.RenderTransform>
                                        <Image Source="/Images/codeplex.png" Margin="5" >
                                            <Image.Effect>
                                                <DropShadowEffect/>
                                            </Image.Effect>
                                        </Image>
                                    </Button>

                                    <Label Grid.Row="1" Content="2."/>
                                    <StackPanel Grid.Column="1" Grid.Row="1">
                                        <Label Content="Xing" FontWeight="Bold" />
                                        <Label Content="http://www.xing.com/profile/Daniel_Bedarf" />
                                    </StackPanel>
                                    <Button x:Name="cmdXing" Grid.Column="3" Grid.Row="1" Margin="10" Click="Useraction_ContactXing">
                                        <Button.RenderTransform>
                                            <TransformGroup>
                                                <ScaleTransform/>
                                                <SkewTransform/>
                                                <RotateTransform/>
                                                <TranslateTransform/>
                                            </TransformGroup>
                                        </Button.RenderTransform>
                                        <Image Source="/Images/xing.png" Margin="5">
                                            <Image.Effect>
                                                <DropShadowEffect/>
                                            </Image.Effect>
                                        </Image>
                                    </Button>

                                    <Label Grid.Row="2" Content="3."/>
                                    <StackPanel Grid.Column="1" Grid.Row="2">
                                        <Label Content="Twitter" FontWeight="Bold" />
                                        <Label Content="http://www.twitter.com/blndev" />
                                    </StackPanel>
                                    <Button x:Name="cmdTwitter" Grid.Column="3" Grid.Row="2" Margin="10" Click="Useraction_ContactTwitter">
                                        <Button.RenderTransform>
                                            <TransformGroup>
                                                <ScaleTransform/>
                                                <SkewTransform/>
                                                <RotateTransform/>
                                                <TranslateTransform/>
                                            </TransformGroup>
                                        </Button.RenderTransform>
                                        <Image Source="/Images/twitter.png" Margin="5">
                                            <Image.Effect>
                                                <DropShadowEffect/>
                                            </Image.Effect>
                                        </Image>
                                    </Button>
                                </Grid>
                            </StackPanel>

                        </TabItem>
                        <!-- Ende Contact -->
                        <!-- Update -->
                        <TabItem IsSelected="False">
                            <TabItem.Header>
                                <StackPanel Orientation="Horizontal" >
                                    <Image Source="/Images/update48.png"  Width="48" Height="48" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,0,4,0"></Image>
                                    <TextBlock >Check for Updates<LineBreak/>                                        
                                    <Run Foreground="DimGray" Text="search available updates on CodePlex.com"></Run>
                                    </TextBlock>
                                </StackPanel>
                            </TabItem.Header>
                            <!-- Right-side content here -->
                            <StackPanel HorizontalAlignment="Left" Margin="20,0">
                                <Label FontSize="14" Foreground="DimGray" FontWeight="Bold">Check for Updates</Label>
                                <Button Content="Check now" Click="Useraction_CheckUpdates" ></Button>                            
                            </StackPanel>
                        </TabItem>
                        <!-- Ende Update -->
                    </Fluent:BackstageTabControl>
                </Fluent:BackstageTabItem>

                <Fluent:Button Text="Exit" Icon="/Images/exit.png" Click="Useraction_CloseApp" />
            </Fluent:Ribbon.BackstageItems>
            
            <!-- Contextabhaengige Tabs (Gruppendefinition) -->
            <Fluent:Ribbon.ContextualGroups>
                <!-- Visibility im STandrad auf Collapsed, für Debug auf Visible -->
                <Fluent:RibbonContextualTabGroup Header="List" Visibility="Hidden"  x:Name="ribbonGroupList" Background="#FF1868E8" BorderBrush="Black"  Fluent:KeyTip.Keys="Uses List Content" />
                <Fluent:RibbonContextualTabGroup Header="Column" Visibility="Hidden"  x:Name="ribbonGroupFields" Background="#FF3D3DB6" BorderBrush="Black"  Fluent:KeyTip.Keys="Uses List Content" />
                <Fluent:RibbonContextualTabGroup Header="Data" Visibility="Hidden"  x:Name="ribbonGroupTools" Background="Green" BorderBrush="Black"  Fluent:KeyTip.Keys="Uses List Content" />
                <Fluent:RibbonContextualTabGroup Header="Web" Visibility="Hidden"  x:Name="ribbonGroupWeb" Background="Green" BorderBrush="Black"  Fluent:KeyTip.Keys="Set Webpropertys" />
            </Fluent:Ribbon.ContextualGroups>

            <!-- Start Tab -->
            <Fluent:RibbonTabItem Header="Start"  Name="ribbonTabStart">
                <!--
                <Fluent:RibbonGroupBox Header="connect" Fluent:KeyTip.Keys="Gruppe 1" >
                    <Fluent:Button Text="Local" LargeIcon="/Images/ConnectLocal.png" Click="Useraction_ConnectToLocalhost" >
                        <Fluent:Button.ToolTip>
                            <Fluent:ScreenTip Title="Connect to local Server" Width ="250" 
                                Text="Click here to connect to http://localhost/"                     
                                />
                        </Fluent:Button.ToolTip>
                    </Fluent:Button>

                    <Fluent:DropDownButton Text="Enter URL" LargeIcon="/Images/Connect.png" >
                        <Fluent:RibbonToolBar  Height="30" Width="500">
                            <Fluent:RibbonToolBar.LayoutDefinitions>
                                <Fluent:RibbonToolBarLayoutDefinition>
                                    <Fluent:RibbonToolBarRow>
                                        <Fluent:RibbonToolBarControlDefinition Target="txtRBURL" Width="450" />
                                        <Fluent:RibbonToolBarControlDefinition Target="cmdRBConnectURL" />
                                    </Fluent:RibbonToolBarRow>
                                </Fluent:RibbonToolBarLayoutDefinition>
                            </Fluent:RibbonToolBar.LayoutDefinitions>
                            <Label Content="URL:" />
                            <TextBox Width="200" Text="" x:Name="txtRBURL" />
                            <Fluent:Button Text="Connect" LargeIcon="/Images/ConnectLocal.png" Icon="/Images/ConnectLocal.png" x:Name="cmdRBConnectURL" Click="Useraction_ConnectToServerURL"/>
                        </Fluent:RibbonToolBar>
                        <Fluent:DropDownButton.ToolTip>
                            <Fluent:ScreenTip Title="Enter URL" Width ="250" 
                                Text="You can enter a URL with Listname to open the List directly"                     
                                DisableReason="unknown"/>
                        </Fluent:DropDownButton.ToolTip>
                    </Fluent:DropDownButton>
                    <Fluent:Button Text="Refresh" LargeIcon="/Images/refresh.png" Click="Useraction_ReloadServerExplorer" >
                        <Fluent:Button.ToolTip>
                            <Fluent:ScreenTip Title="Refresh" Width ="250" 
                                Text="reread all data from server"                     
                                />
                        </Fluent:Button.ToolTip>
                    </Fluent:Button>
                </Fluent:RibbonGroupBox>
                -->
                <!-- Mvmm Favoriten (V2) -->
                <!--
            <Fluent:RibbonGroupBox Header="Favorites" Fluent:KeyTip.Keys="Gruppe 1" >
                <Fluent:Button Text="Add" />
                <Fluent:Button Text="Remove"  />
                <Fluent:Gallery>
                    <Fluent:GalleryItem ></Fluent:GalleryItem>
                </Fluent:Gallery>
            </Fluent:RibbonGroupBox>
            -->
                <Fluent:RibbonGroupBox Header="open with" Fluent:KeyTip.Keys="Open selected with external tool" >
                    <Fluent:Button Text="Browser" IsEnabled="False" LargeIcon="/Images/browser.png" Click="Useraction_OpenItemInBrowser" x:Name="cmdOpenItemInBrowser">
                        <Fluent:Button.ToolTip>
                            <Fluent:ScreenTip Title="Open in Browser" Width ="250" 
                                Text="Open the selected Web/List in the default Browser"                     
                                DisableReason="No selected item"/>
                        </Fluent:Button.ToolTip>
                    </Fluent:Button>
                    <Fluent:Button Text="SPDesigner" IsEnabled="False" LargeIcon="/Images/spd.png" Click="Useraction_OpenItemInSPD" x:Name="cmdOpenItemInSPD">
                        <Fluent:Button.ToolTip>
                            <Fluent:ScreenTip Title="Open in SharepointDesigner" Width ="250" 
                                              Text="open the selected list in sharepointdesigner"
                                DisableReason="SharepointDesigner not found or no selected list"/>
                        </Fluent:Button.ToolTip>
                    </Fluent:Button>
                </Fluent:RibbonGroupBox>
                <Fluent:RibbonGroupBox Header="external tools" Fluent:KeyTip.Keys="External Tools" >
                    <Fluent:Button Text="IISReset"  LargeIcon="/Images/console.png" Click="Useraction_IISReset">
                        <Fluent:Button.ToolTip>
                            <Fluent:ScreenTip Title="IISReset.exe" Width ="250" 
                                Text="run iisreset.exe without parameters"                     
                                DisableReason="command not found"/>
                        </Fluent:Button.ToolTip>
                    </Fluent:Button>
                    <Fluent:Button Text="PowerShell" LargeIcon="/Images/powershell.png" Click="Useraction_OpenPowershell">
                        <Fluent:Button.ToolTip>
                            <Fluent:ScreenTip Title="Open in Sharepoint Powershell" Width ="250" 
                                Text="open powershell with integrated sharepoint commands"                     
                                DisableReason=""/>
                        </Fluent:Button.ToolTip>
                    </Fluent:Button>
                    <Fluent:Button Text="WWWRoot" LargeIcon="/Images/WWWRoot.png" Click="Useraction_OpenWWWDir" >
                        <Fluent:Button.ToolTip>
                            <Fluent:ScreenTip Title="Open the IIS-SharePoint directory" Width ="250" 
                                Text="open the iis-sharepoint directory.\n easy way to find the web.config"                     
                                DisableReason=""/>
                        </Fluent:Button.ToolTip>
                    </Fluent:Button>
                    <Fluent:Button Text="InstallDir" LargeIcon="/Images/InstallDir.png" Click="Useraction_OpenInstallDir" >
                        <Fluent:Button.ToolTip>
                            <Fluent:ScreenTip Title="Install Directory" Width ="250" 
                                Text="open the default install directory for sharepoint 2010"                     
                                DisableReason="Directory not found"/>
                        </Fluent:Button.ToolTip>
                    </Fluent:Button>
                </Fluent:RibbonGroupBox>
                
                <Fluent:RibbonGroupBox Header="Security">
                    <Fluent:Button Text="Inherit Rights" LargeIcon="/Images/analyze.png"  IsEnabled="True" Click="Useraction_ResetRoleInheritancesForWeb">
                        <Fluent:Button.ToolTip>
                            <Fluent:ScreenTip Title="Reset the Security" Width ="250" 
                                Text="Set rights for the current web to the parent rights (inherit)"                     
                                DisableReason="will be implemented in future releases"/>
                        </Fluent:Button.ToolTip>
                    </Fluent:Button>
                </Fluent:RibbonGroupBox>

                <Fluent:RibbonGroupBox Header="" Fluent:KeyTip.Keys="Important Infos" Margin="10,0,10,0">
                    <Fluent:Button Text="No Warranty!" LargeIcon="/Images/info.png" IsTabStop="False" VerticalAlignment="Center" Click="Useraction_ShowReadMe">
                        <Fluent:Button.ToolTip>
                            <Fluent:ScreenTip Title="NO WARRANTY" Width ="250" 
                                Text="This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details."
                                Image="/Images/GNU.png"                                              
                                />
                        </Fluent:Button.ToolTip>
                    </Fluent:Button>
                </Fluent:RibbonGroupBox>
            </Fluent:RibbonTabItem>
            
            <!-- Filter Tab-->
            <Fluent:RibbonTabItem Header="Filter"  Fluent:KeyTip.Keys="Configure SiteCollection Settings (SPSite)" >
                <!--<Fluent:RibbonGroupBox Header="Web">
                </Fluent:RibbonGroupBox>-->
                <Fluent:RibbonGroupBox Header="show list which are">
                    <Fluent:ToggleButton  Text="Userlists" IsChecked="True" LargeIcon="/Images/list.png" x:Name="filterListUserLists">
                        <Fluent:ToggleButton.ToolTip>show all lists which are not hidden or readonly</Fluent:ToggleButton.ToolTip>
                    </Fluent:ToggleButton>
                    <Fluent:ToggleButton  Text="DokLibs" IsChecked="True" LargeIcon="/Images/doclib.png" x:Name="filterListDokLib" >
                        <Fluent:ToggleButton.ToolTip>show document librarys</Fluent:ToggleButton.ToolTip>
                    </Fluent:ToggleButton>
                    <Fluent:ToggleButton  Text="Hidden" LargeIcon="/Images/list_hidden.png" x:Name="filterListHidden" >
                        <Fluent:ToggleButton.ToolTip>show lists which marked as invisible to the user.</Fluent:ToggleButton.ToolTip>
                    </Fluent:ToggleButton>
                    <Fluent:ToggleButton  Text="not Deletable" LargeIcon="/Images/list_ro.png" x:Name="filterListCatalogs">
                        <Fluent:ToggleButton.ToolTip>show lists which are marked as not deletable (e.g. catalogs)</Fluent:ToggleButton.ToolTip>
                    </Fluent:ToggleButton>

                    <Fluent:DropDownButton Text="by Type" IsEnabled="False">
                        <!-- Hier später noch Combo für Basistyp z.B. Kalender, Benutzerdefiniert etc.-->
                        <Fluent:DropDownButton.ToolTip>
                            <Fluent:ScreenTip   Title="Filter by ListType" Text="allows list to be filtered by type like calendar or tasks" DisableReason="this feature is currently not implemented"/>
                        </Fluent:DropDownButton.ToolTip>
                    </Fluent:DropDownButton>
                    
                    <Fluent:Button Text="Apply" LargeIcon="/Images/apply.png" Click="Useraction_ApplyListFilter" >
                        <Fluent:Button.ToolTip>read lists and doclibs again with current filtersettings</Fluent:Button.ToolTip>
                    </Fluent:Button>
                    
                </Fluent:RibbonGroupBox>
                <Fluent:RibbonGroupBox Header="show columns if they are">
                    <Fluent:RibbonGroupBox.ToolTip>Filter have to be combined if a column is e.g. hidden and readonly</Fluent:RibbonGroupBox.ToolTip>
                    <Fluent:ToggleButton  Text="Default" LargeIcon="/Images/field.png" IsChecked="True" x:Name="filterFieldStd" >
                        <Fluent:ToggleButton.ToolTip>show columns which are not filtered by other filters</Fluent:ToggleButton.ToolTip>
                    </Fluent:ToggleButton>
                    <Fluent:ToggleButton  Text="Required" LargeIcon="/Images/field_req.png" IsChecked="True" x:Name="filterFieldRequired" >
                        <Fluent:ToggleButton.ToolTip>show columns which are required</Fluent:ToggleButton.ToolTip>
                    </Fluent:ToggleButton>
                    <Fluent:ToggleButton  Text="Computed" LargeIcon="/Images/field_comp.png" x:Name="filterFieldComputed" >
                        <Fluent:ToggleButton.ToolTip>show columns which are computed or filled by sharepoint</Fluent:ToggleButton.ToolTip>
                    </Fluent:ToggleButton>
                    <Fluent:ToggleButton  Text="ReadOnly"  LargeIcon="/Images/field_ro.png" x:Name="filterFieldReadOnly"  >
                        <Fluent:ToggleButton.ToolTip>show columns which are not editable by user</Fluent:ToggleButton.ToolTip>
                    </Fluent:ToggleButton>
                    <Fluent:ToggleButton  Text="Hidden" LargeIcon="/Images/field_hidden.png" x:Name="filterFieldHidden"  >
                        <Fluent:ToggleButton.ToolTip>show columns which are hidden</Fluent:ToggleButton.ToolTip>
                    </Fluent:ToggleButton>
                    <Fluent:ToggleButton  Text="not Deletable" LargeIcon="/Images/field_delete.png" x:Name="filterFieldDeletable"  >
                        <Fluent:ToggleButton.ToolTip>shows columns which are not deletable</Fluent:ToggleButton.ToolTip>
                    </Fluent:ToggleButton>
                    <Fluent:Button Text="Apply" LargeIcon="/Images/field_apply.png" Click="Useraction_ApplyColumnFilter"  >
                        <Fluent:Button.ToolTip>read columns again with the selected filter</Fluent:Button.ToolTip>
                    </Fluent:Button>


                </Fluent:RibbonGroupBox>
            </Fluent:RibbonTabItem>
            
            <!-- Settings -->
            <Fluent:RibbonTabItem Header="Settings"  Fluent:KeyTip.Keys="Configure SiteCollection Settings (SPSite)" >
                <Fluent:RibbonGroupBox Header="Show Window">
                    <Fluent:Button Text="Web Explorer" LargeIcon="/Images/explorer.png" Click="Useraction_ShowExplorerPane" >
                        <Fluent:Button.ToolTip>show the webexplorer - pane</Fluent:Button.ToolTip>
                    </Fluent:Button>
                    <Fluent:Button Text="Lists" LargeIcon="/Images/list.png" Click="Useraction_ShowListPane"  >
                        <Fluent:Button.ToolTip>show the list detail pane</Fluent:Button.ToolTip>
                    </Fluent:Button>
                    <Fluent:Button Text="Columns" LargeIcon="/Images/field.png" Click="Useraction_ShowFieldPane" >
                        <Fluent:Button.ToolTip>show the column detail pane</Fluent:Button.ToolTip>
                    </Fluent:Button>
                    <!-- <Fluent:Button Text="Properties" Click="Useraction_ShowPropertyPane"/> -->
                    <Fluent:Button Text="Journal" LargeIcon="/Images/journal.png" Click="Useraction_ShowJournalPane" >
                        <Fluent:Button.ToolTip>show the journal pane</Fluent:Button.ToolTip>
                    </Fluent:Button>
                    <Fluent:Button Text="Notes" LargeIcon="/Images/notes.png" Click="Useraction_ShowNotesPane" >
                        <Fluent:Button.ToolTip>show the app notepad</Fluent:Button.ToolTip>
                    </Fluent:Button>
                </Fluent:RibbonGroupBox>
                <Fluent:RibbonGroupBox Header="Journal">
                    <Fluent:Button Text="Clear"  IsEnabled="False">
                        <Fluent:Button.ToolTip>
                            <Fluent:ScreenTip Title="Clear" Width ="250" 
                                Text="delete the journal content"                     
                                DisableReason="will be implemented in future releases"/>
                        </Fluent:Button.ToolTip>
                    </Fluent:Button>
                    <Fluent:Button Text="Export XML"  IsEnabled="False">
                        <Fluent:Button.ToolTip>
                            <Fluent:ScreenTip Title="Export XML" Width ="250" 
                                Text="export journal as xml file"                     
                                DisableReason="will be implemented in future releases"/>
                        </Fluent:Button.ToolTip>
                    </Fluent:Button>
                    <Fluent:Button Text="Export CSV"  IsEnabled="False">
                        <Fluent:Button.ToolTip>
                            <Fluent:ScreenTip Title="Export CSV" Width ="250" 
                                Text="export the journal as csv or excel file"                     
                                DisableReason="will be implemented in future releases"/>
                        </Fluent:Button.ToolTip>
                    </Fluent:Button>
                    <Fluent:Button Text="Export HTM"  IsEnabled="False">
                        <Fluent:Button.ToolTip>
                            <Fluent:ScreenTip Title="Export HTML" Width ="250" 
                                Text="export the journal as website"                     
                                DisableReason="will be implemented in future releases"/>
                        </Fluent:Button.ToolTip>
                    </Fluent:Button>
                </Fluent:RibbonGroupBox>
                <Fluent:RibbonGroupBox Header="Application">
                    <Fluent:Button Text="Reset Layout"  IsEnabled="False" >
                        <Fluent:Button.ToolTip>
                            <Fluent:ScreenTip Title="Reset Layout" Width ="250" 
                                Text="restart the app and load the default layout\n\nyou can do that also by delete the layout.cfg file."                     
                                DisableReason="will be implemented in future releases"/>
                        </Fluent:Button.ToolTip>
                    </Fluent:Button>
                </Fluent:RibbonGroupBox>

            </Fluent:RibbonTabItem>

            <!-- SPList -->
            <Fluent:RibbonTabItem Header="Edit" Visibility="Hidden"  ToolTip="Configure List Settings"  Group="{Binding ElementName=ribbonGroupList}" Name="ribbonTabEditList">
                <Fluent:RibbonGroupBox Header="Action">
                    <Fluent:Button Text="Analyse" LargeIcon="/Images/analyze.png"  IsEnabled="False" >
                        <Fluent:Button.ToolTip>
                            <Fluent:ScreenTip Title="Analyse List" Width ="250" 
                                Text="create a summary about the selected List"                     
                                DisableReason="will be implemented in future releases"/>
                        </Fluent:Button.ToolTip>
                    </Fluent:Button>
                    <Fluent:Button Text="Edit" LargeIcon="/Images/list_edit.png"  IsEnabled="True" Click="Useraction_EditListPropertys">
                        <Fluent:Button.ToolTip>
                            <Fluent:ScreenTip Title="Edit List Propertys" Width ="250" 
                                Text="edit some of the selected List propertys"                     
                                DisableReason="no list selected"/>
                        </Fluent:Button.ToolTip>
                    </Fluent:Button>
                    <Fluent:DropDownButton Text="Copy" LargeIcon="/Images/copy.png" IsEnabled="False">
                        <Fluent:DropDownButton.ToolTip>
                            <Fluent:ScreenTip 
                                Title="Copy..."
                                Text="Allows you to copy content, columns or views from one list to an other" 
                                DisableReason="will be implemented in future releases" />
                        </Fluent:DropDownButton.ToolTip>
                        <Fluent:MenuItem Text="Data"  />
                        <Fluent:MenuItem Text="Fields"  />
                        <Fluent:MenuItem Text="Views"  />
                        <Fluent:MenuItem Text="All"  />
                    </Fluent:DropDownButton>

                    <Fluent:Button Text="Clear" LargeIcon="/Images/list_clear.png" ToolTip="delete the whole list content" Click="Useraction_DeleteListContent"></Fluent:Button>
                    <Fluent:Button Text="Delete" LargeIcon="/Images/list_delete.png" ToolTip="delete the selected list" Click="Useraction_DeleteList"/>
                </Fluent:RibbonGroupBox>
                
                <Fluent:RibbonGroupBox Header="Set Propertys" ToolTip="change settings of the selected list" >
                    <Fluent:ToggleButton Text="Hidden" LargeIcon="/Images/list_togglehidden.png" ToolTip="toggle selected List visiblity in the webinterface" Checked="Useraction_ToggleListVisibility" Unchecked="Useraction_ToggleListVisibility" Name="chkCurrentListHidden" />
                    <Fluent:ToggleButton Text="not Deletable" LargeIcon="/Images/list_toggledeletable.png" ToolTip="toggle deletable property of selected list" Unchecked="Useraction_ToggleListDeletability" Checked="Useraction_ToggleListDeletability" Name="chkCurrentListNotDeleteable" />
                </Fluent:RibbonGroupBox>
                
                <Fluent:RibbonGroupBox Header="Manage">
                    <!--<Fluent:Button Text="New" LargeIcon="/Images/event_add.png" Click="Useraction_AddEventhandlerToList"/>-->
                    <Fluent:Button Text="Event Receiver" LargeIcon="/Images/list_events.png" Click="Useraction_ShowListEventhandler">
                        <Fluent:Button.ToolTip>
                            <Fluent:ScreenTip Title="Manage List EventReceiver" Width ="250" 
                                Text="open a window to show the attached eventreceiver, remove them or add some new"                     
                                />
                        </Fluent:Button.ToolTip>
                    </Fluent:Button>
                </Fluent:RibbonGroupBox>
                
                <Fluent:RibbonGroupBox Header="Open" ToolTip="open sharepoint websites to manage the selected list">
                    <Fluent:Button Text="Edit List" LargeIcon="/Images/list_edit.png" ToolTip="open browser to edit default settings for the list" Click="Useraction_ShowListSettingsWeb"/>
                    <Fluent:Button Text="Manage Rights" LargeIcon="/Images/list_rights.png" ToolTip="open browser to manage rights for the list" Click="Useraction_ShowManageRights"/>
                    <Fluent:Button Text="Add View" LargeIcon="/Images/view_add.png" ToolTip="open browser to add a view" Click="Useraction_ShowListAddView"/>
                    <Fluent:Button Text="Add Column" LargeIcon="/Images/field.png" ToolTip="open browser to add a column" Click="Useraction_ShowAddField" />
                </Fluent:RibbonGroupBox>
                <!--
                <Fluent:RibbonGroupBox Header="Views">
                    <Fluent:Button Text="Add" ToolTip="Open Browser with AddView Page" />
                </Fluent:RibbonGroupBox>-->
                <Fluent:RibbonGroupBox Header="Refresh">
                    <Fluent:Button Text="" LargeIcon="/Images/refresh.png" ToolTip="reload lists for current web" Click="Useraction_ReloadLists" />
                </Fluent:RibbonGroupBox>
            </Fluent:RibbonTabItem>

            <!-- SPField -->
            <Fluent:RibbonTabItem Header="Edit" Visibility="Hidden" ToolTip="Configure Column Settings (SPField)" Group="{Binding ElementName=ribbonGroupFields}" Name="ribbonTabEditField">
                <Fluent:RibbonGroupBox Header="Edit">
                    <Fluent:Button Text="Show Edit-Pane" LargeIcon="/Images/field_edit.png" ToolTip="show a page to edit propertys of selected column(s)" Click="Useraction_ShowEditFieldPage" />
                    <Fluent:Button Text="Delete Columns" LargeIcon="/Images/field_delete.png" ToolTip="delete the selected column(s)" Click="Useraction_DeleteField"/>
                </Fluent:RibbonGroupBox>
                <Fluent:RibbonGroupBox Header="Open">
                    <Fluent:Button Text="Add Column" LargeIcon="/Images/field.png" ToolTip="open browser to add new column" Click="Useraction_ShowAddField" />
                </Fluent:RibbonGroupBox>
                <Fluent:RibbonGroupBox Header="Refresh">
                    <Fluent:Button Text="" LargeIcon="/Images/refresh.png" ToolTip="reload columns of selected List" Click="Useraction_ReloadColumns" />
                </Fluent:RibbonGroupBox>
            </Fluent:RibbonTabItem>

            <!-- SPWeb  -->
            <Fluent:RibbonTabItem Header="Web" Visibility="Hidden" Group="{Binding ElementName=ribbonGroupWeb}">
                <Fluent:RibbonGroupBox Header="Security">
                    <Fluent:Button Text="Inherit Rights" LargeIcon="/Images/analyze.png"  IsEnabled="True" >
                        <Fluent:Button.ToolTip>
                            <Fluent:ScreenTip Title="Reset the Security" Width ="250" 
                                Text="Set rights for the current web to the parent rights (inherit)"                     
                                DisableReason="will be implemented in future releases"/>
                        </Fluent:Button.ToolTip>
                    </Fluent:Button>
                </Fluent:RibbonGroupBox>
            </Fluent:RibbonTabItem>
            
            <!-- Tools -->
            <Fluent:RibbonTabItem Header="Data" Visibility="Hidden" Group="{Binding ElementName=ribbonGroupTools}">
                <Fluent:RibbonGroupBox Header="Group">
                    <Fluent:Button Text="Table" />
                    <Fluent:Button Text="RSS" />
                </Fluent:RibbonGroupBox>
            </Fluent:RibbonTabItem>
            
            <Fluent:RibbonTabItem Header="Export" Visibility="Hidden" Group="{Binding ElementName=ribbonGroupTools}">
                    <Fluent:RibbonGroupBox Header="All">
                        <Fluent:Button Text="CSV" Icon="/Images/gnu.png"  />
                        <Fluent:Button Text="XML" Icon="/Images/gnu.png" LargeIcon="/Images/gnu.png" />
                        <Fluent:Button Text="HTML" Icon="/Images/gnu.png" LargeIcon="/Images/gnu.png" />
                </Fluent:RibbonGroupBox>
                    <Fluent:RibbonGroupBox Header="View">
                        <Fluent:Button Text="CSV" Icon="/Images/gnu.png"  />
                        <Fluent:Button Text="XML" Icon="/Images/gnu.png" LargeIcon="/Images/gnu.png" />
                    </Fluent:RibbonGroupBox>
            </Fluent:RibbonTabItem>
        </Fluent:Ribbon>
        <!-- Content -->
        <ad:DockingManager Grid.Row="1" Loaded="DockingManager_Loaded" Name="_adDockManager">
            <ad:ResizingPanel Orientation="Vertical" >
                <ad:ResizingPanel Orientation="Horizontal" >

                    <ad:ResizingPanel Orientation="Vertical" >
                        <ad:DockablePane>
                            <ad:DockableContent Title="Web Explorer" DockableStyle="DockableToBorders" IsCloseable="True" x:Name="_ServerExplorerPane" >
                                <ad:DockableContent.Icon>
                                    <Image Source="/Images/explorer.png" Height="16" Width="16"/>
                                </ad:DockableContent.Icon>
                                <TreeView x:Name="tvwServerExplorer" SelectedItemChanged="Event_ServerExplorer_SelectedItemChanged">
                                    <TreeViewItem x:Name="tvwNodeWeb">
                                        <TreeViewItem.Header>
                                                <StackPanel Orientation="Horizontal" >
                                                <Image Source="/Images/treeWebs.png" Margin="0,0,5,0"/>
                                                <TextBlock>Webs</TextBlock>
                                            </StackPanel>
                                        </TreeViewItem.Header>
                                    </TreeViewItem>
                                    <TreeViewItem x:Name="tvwNodeLists">
                                        <TreeViewItem.Header>
                                            <StackPanel Orientation="Horizontal" Margin="0,5,0,0" >
                                                <Image Source="/Images/folder.png" Margin="0,0,5,0"/>
                                                <TextBlock>Lists</TextBlock>
                                            </StackPanel>
                                        </TreeViewItem.Header>
                                    </TreeViewItem>

                                    <TreeViewItem  x:Name="tvwNodeDocLibs" Visibility="{Binding ElementName=filterListDokLib, Path=IsChecked}" >
                                        <TreeViewItem.Header>
                                            <StackPanel Orientation="Horizontal" Margin="0,5,0,0">
                                                <Image Source="/Images/folder.png" Margin="0,0,5,0"/>
                                                <TextBlock>DocLibs</TextBlock>
                                            </StackPanel>
                                        </TreeViewItem.Header>
                                    </TreeViewItem>

                                </TreeView>
                            </ad:DockableContent>
                        </ad:DockablePane>
                        <ad:DockablePane>
                            <ad:DockableContent Title="Lists / DocLibs" DockableStyle="Dockable" IsCloseable="True" x:Name="_ListsPane">
                                <ad:DockableContent.Icon>
                                    <Image Source="/Images/list.png" Height="16" Width="16"/>
                                </ad:DockableContent.Icon>
                                <ListView x:Name="lvwLists" SelectionChanged="Useraction_ShowListDetails" SelectionMode="Single" Foreground="Black">
                                    <ListView.View>
                                        <GridView>
                                            <GridViewColumn Header="Name"  Width="100" DisplayMemberBinding="{Binding Title}" />
                                            <GridViewColumn Header="Items" Width="50" DisplayMemberBinding="{Binding ItemCount}" />
                                            <GridViewColumn Header="Created" Width="50" DisplayMemberBinding="{Binding Created}" />
                                            <GridViewColumn Header="Data Last Changed" Width="100" DisplayMemberBinding="{Binding LastItemModifiedDate}" />
                                            <GridViewColumn Header="Type" Width="140" DisplayMemberBinding="{Binding BaseTemplate}" />
                                        </GridView>
                                    </ListView.View>
                                </ListView>
                            </ad:DockableContent>
                        </ad:DockablePane>
                        <ad:DockablePane>
                            <ad:DockableContent Title="Columns" DockableStyle="Dockable" IsCloseable="True" x:Name="_FieldsPane">
                                <ad:DockableContent.Icon>
                                    <Image Source="/Images/field.png" Height="16" Width="16"/>
                                </ad:DockableContent.Icon>
                                <ListView x:Name="lvwFields" SelectionChanged="Useraction_ShowFieldDetails"  Foreground="Black">
                                    <ListView.View>
                                        <GridView>
                                            <GridViewColumn Header="Name" Width="100" DisplayMemberBinding="{Binding Title}" />
                                            <GridViewColumn Header="Static Name" Width="100" DisplayMemberBinding="{Binding StaticName}" />
                                            <GridViewColumn Header="Internal Name" Width="100" DisplayMemberBinding="{Binding InternalName}" />
                                            <GridViewColumn Header="Type" Width="140" DisplayMemberBinding="{Binding TypeDisplayName}" />
                                            <!--<GridViewColumn Header="Group" Width="60" DisplayMemberBinding="{Binding Group}" />-->
                                        </GridView>
                                    </ListView.View>
                                </ListView>
                            </ad:DockableContent>
                        </ad:DockablePane>
                    </ad:ResizingPanel>
                    <ad:DocumentPane x:Name="_DocumentPane">
                        <!-- //TODO  <local:DetailPage Title="Details" x:Name="_DetailPage" IsCloseable="False" />-->
                        <!--<local:FieldPropertyPage Title="just Test" />-->
                    </ad:DocumentPane>

                    <!--
                    <ad:DockablePane>
                        <ad:DockableContent x:Name="_PropertiePane" Title="Properties" DockableStyle="DockableToBorders" >
                            <StackPanel >
                                <Button Content="Save" IsEnabled="False"></Button>
                                <Label Content="Comming Soon" FontWeight="Bold" FontSize="20" HorizontalAlignment="Center" VerticalAlignment="Center" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" />
                            </StackPanel>
                        </ad:DockableContent>
                    </ad:DockablePane>
                    -->
                </ad:ResizingPanel>

                <ad:DockablePane ad:ResizingPanel.ResizeHeight="100">
                    <ad:DockableContent Title="Temporary notes" DockableStyle="DockableToBorders" Selector.IsSelected="True" x:Name="_NotesPane">
                        <ad:DockableContent.Icon>
                            <Image Source="/Images/notes.png" Height="16" Width="16"/>
                        </ad:DockableContent.Icon>
                        <TextBox AcceptsReturn="True" AcceptsTab="True" Foreground="Black" Background="White" ToolTip="You can use this area to store data temporarily" x:Name="txtNotepad"/>
                </ad:DockableContent>
                    <ad:DockableContent Title="Journal" DockableStyle="DockableToBorders" x:Name="_JournalPane">
                        <ad:DockableContent.Icon>
                            <Image Source="/Images/journal.png" Height="16" Width="16"/>
                        </ad:DockableContent.Icon>
                        <ListView x:Name="lvwJournal"  Foreground="Black">
                            <ListView.View>
                                <GridView>
                                    <GridViewColumn Header="Timestamp"  Width="130" DisplayMemberBinding="{Binding Key}" />
                                    <GridViewColumn Header="Message" Width="500" DisplayMemberBinding="{Binding Value}" />
                                </GridView>
                            </ListView.View>
                            
                        </ListView>
                </ad:DockableContent>
                </ad:DockablePane>
            </ad:ResizingPanel>
        </ad:DockingManager>
        <!-- Row 2 (3) kann noch zugefügt werden-->

    </Grid>
</Fluent:RibbonWindow>
